package com.task;

import java.io.*;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * author:hlc
 * date:2023/10/4
 *
 * @author 17930
 */
public class Start {
   public static void main(String[] args) throws IOException {
      ReadFile readFile = new ReadFile();
      Thread thread = new Thread(readFile);
      ScheduledExecutorService executor = new ScheduledThreadPoolExecutor(1);
      executor.scheduleWithFixedDelay(thread,0,5, TimeUnit.SECONDS);
   }
}
